package com.yixin.hospital.controller;

import com.yixin.hospital.common.Constant;
import com.yixin.hospital.utils.CaffeineUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;

@Slf4j
public class SchedualController {

    /**
     * 每日0点将位数归位1
     * @return
     */
    @Scheduled(cron = "0 0 0 * * ?")
    public Void sendMessage() {
        log.info("GC code号 归001");
        CaffeineUtils.put(Constant.PURCHASE_CODE_PRE, 1);
        return null;
    }
}
